﻿using RuYiAdmin.Net.Entity.CoreEnum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RuYiAdmin.Net.Entity.CoreEntity
{
    /// <summary>
    /// 查询项
    /// </summary>
    public class QueryItem
    {
        /// <summary>
        /// 查询项字段
        /// </summary>
        public String Field { get; set; }

        /// <summary>
        /// 查询项类型
        /// </summary>
        public DataType DataType { get; set; }

        /// <summary>
        /// 查询项方法
        /// </summary>
        public QueryMethod QueryMethod { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public Object Value { get; set; }

        /// <summary>
        /// 获取缺省QueryItem
        /// </summary>
        /// <returns>QueryItem</returns>
        public static QueryItem GetDefault()
        {
            return new QueryItem() { Field = "IsDel", DataType = DataType.Int, QueryMethod = QueryMethod.Equal, Value = 0 };
        }
    }
}
